package com.wanlian.netty.msg.Device;

import com.wanlian.File.NetFileInfo;
import com.wanlian.json.JsonStringUtil;
import com.wanlian.netty.msg.BaseMsg;
import com.wanlian.netty.msg.MsgType;

import java.util.List;

/**
 * 文件持续下载指令
 */
public class FileContinueDownloadMsg extends BaseMsg {
    /**
     * 表示需要获取那些片段
     */
    private List<NetFileInfo> netFileInfos;

    public FileContinueDownloadMsg(){
        this.setType(MsgType.DEVICE_FILE_CONTINUTE_UPLOAD_REQ);
    }
    public List<NetFileInfo> getNetFileInfos() {
        return netFileInfos;
    }

    public void setNetFileInfos(List<NetFileInfo> netFileInfos) {
        this.netFileInfos = netFileInfos;
        this.setContent(JsonStringUtil.writeValueAsString(netFileInfos));
    }
}
